package ioc10;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/5/17 9:04
 * Version:1.0-SNAPSHOT
 * Description:
 */
public class SomeBean implements ApplicationContextAware {

    private ApplicationContext ac;

    @Override
    public void setApplicationContext(ApplicationContext ac) throws BeansException {
        this.ac = ac;
    }

    public void doSome(){
//        ApplicationContext ac = new ClassPathXmlApplicationContext("ioc10/spring.xml");
        System.out.println("Some ac:"+ac);
    }


}
